|
class Toolbar |
|
Parent: Object |
|
|
Methods: new, add_item, add_seperator, get_last_state, hide, restore, show, visible? |
|
|
Sample Code: toolbartests.rb |
|
|
Class Methods |
|
new |
|
The new method creates a new Toolbar object. |
|
Syntax: |
|
toolbar = UI::Toolbar.new "toolbarname" |
|
Arguments: |
|
"toolbarname" - the name for the new toolbar |
|
Return Value: |
|
toolbar - the newly created toolbar object |
|
Comments: |
|
|
|
Example: |
|
toolbar = UI::Toolbar.new "Test" |
|
Instance Methods |
|
add_item |
|
The add_item method is used to add an item to the toolbar. |
|
Syntax: |
|
toolbar = toolbar.add_item command |
|
Arguments: |
|
command - a Command object representing the command to add to the toolbar |
|
Return Value: |
|
toolbar - the toolbar where the command was just added |
|
Comments: |
|
|
|
Example: |
|
toolbar
= UI::Toolbar.new "Test" |
|
add_separator |
|
The add_separator method is used to add a line separator to the toolbar. |
|
Syntax: |
|
toolbar = toolbar.add_seperator |
|
Arguments: |
|
|
|
Return Value: |
|
toolbar - the toolbar where the line separator was just added |
|
Comments: |
|
|
|
Example: |
|
toolbar = UI::Toolbar.new "Test" |
|
get_last_state |
|
The get_last_state method is used to determine if the toolbar is hidden or visible in the user interface. |
|
Syntax: |
|
state = toolbar.get_last_state |
|
Arguments: |
|
|
|
Return Value: |
|
state - the last state of the toolbar (see comments) |
|
Comments: |
|
Valid states are 1 for visible, 0 for hidden, -1 for never shown. |
|
Example: |
|
toolbar
= UI::Toolbar.new "Test" |
|
hide |
|
The hide method is used to hide the toolbar on the user interface. |
|
Syntax: |
|
toolbar.hide |
|
Arguments: |
|
|
|
Return Value: |
|
|
|
Comments: |
|
|
|
Example: |
|
toolbar
= UI::Toolbar.new "Test" |
|
restore |
|
The restore method is used to reposition the toolbar to its previous location and show if not hidden. |
|
Syntax: |
|
toolbar.restore |
|
Arguments: |
|
|
|
Return Value: |
|
|
|
Comments: |
|
|
|
Example: |
|
toolbar
= UI::Toolbar.new "Test" |
|
show |
|
The show method is used to display the toolbar in the user interface. |
|
Syntax: |
|
toolbar.show |
|
Arguments: |
|
|
|
Return Value: |
|
|
|
Comments: |
|
|
|
Example: |
|
toolbar
= UI::Toolbar.new "Test" |
|
visible? |
|
The visible? method is used to determine if the toolbar is currently visible in the user interface. |
|
Syntax: |
|
status = toolbar.visible? |
|
Arguments: |
|
|
|
Return Value: |
|
status - true if visible, false if not visible |
|
Comments: |
|
|
|
Example: |
|
toolbar
= UI::Toolbar.new "Test" |